import request from '@/utils/request.js'

export default {
	getNews(type) {
		return request.post('/user/advertising', {type}, { noAuth: true})
	},
    readNews(id) {
        return request.post('/user/readAdvertising', {id}, { noAuth: true})
    },
    getTips() {
        return request.post('/user/advertising_position', {}, { noAuth: true})
    },
	getHome(data) {
		return request.post('/user/sel_day_motion',data, { noAuth: true})
	},
	// zuixin
	getLastRun(data) {
		return request.post('/user/lately_run',data, { noAuth: true})
	},
	getLastStep(data) {
		return request.post('/user/lately_walk',data, { noAuth: true})
	},

	getRankList(data) {
		return request.post('/user/rankingList',data, { noAuth: true})
	},

    start(data) {
        return request.post('/user/lately_walk',data, { noAuth: true})
    },

    end(data) {
        return request.post('/user/end_run_or_walk',data, { noAuth: false})
    },


    updateValue(key, value) {
        return request.post(`/user/${key}`,{ steps: value }, { noAuth: false})
    }
}
